package cloud.ben.smallscalepigfarmmanagementsystem.entity.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotNull;

/**
 * @Author: Ben
 * @Date: 2022/3/26 14:49
 */
@TableName("customer")
@ApiModel(description = "客户基本信息表")
@Data
@ToString
@NoArgsConstructor
public class Customer {



    /**
     * 客户id
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(required = true,value = "客户id")
    private Integer id;


    /**
     * 客户名字
     */
    @ApiModelProperty(required = true,value = "客户名字")
    @NotNull(message = "客户名字为空")
    private String customerName;

    /**
     * 客户公司
     */
    @ApiModelProperty(required = true,value = "客户公司")
    @NotNull(message = "客户公司为空")
    private String customerFactory;

    /**
     * 客户等级
     */
    @ApiModelProperty(required = true,value = "客户等级")
    @NotNull(message = "客户等级为空")
    private String customerLevel;


    public Customer(Integer id, String customerName, String customerFactory, String customerLevel) {
        this.id = id;
        this.customerName = customerName;
        this.customerFactory = customerFactory;
        this.customerLevel = customerLevel;
    }

    public Customer(String customerName, String customerFactory, String customerLevel) {
        this.customerName = customerName;
        this.customerFactory = customerFactory;
        this.customerLevel = customerLevel;
    }
}
